﻿import QtQuick 2.15
import QtQuick.Controls 2.15
/*
  位置补偿设置界面
*/

Item {
    id:backGround
    width: screenWidth
    height: 1600

    Rectangle{
        anchors.fill: backGround
        color: "#00BFFF"
        border.width: 5
        border.color: "#F0F8FF"
    }

    onVisibleChanged: {
        if(visible === true)
        {
            Cpp_Connect.pageNumber = 16
        }
    }

    Rectangle{
        anchors.top: backGround.top
        anchors.horizontalCenter: backGround.horizontalCenter
        color: "#00BFFF"
        border.width: 5
        border.color: "#F0F8FF"
        width: backGround.width
        height: 1000

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 70
            font.pixelSize: 30
            font.bold: true
            text: qsTr("250")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 30
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_01_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate01
            }

            TextInput{      // 位置补偿 1
                id: locationCompensate_01_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1302",locationCompensate_01_Input.text)
                    locationCompensate_01_Text.visible = true
                    locationCompensate_01_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_01_Input.forceActiveFocus()
                    locationCompensate_01_Input.text = locationCompensate_01_Text.text
                    locationCompensate_01_Text.visible = false
                    locationCompensate_01_Input.visible = true
                    locationCompensate_01_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 190
            font.pixelSize: 30
            font.bold: true
            text: qsTr("500")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 150
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_02_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate02
            }

            TextInput{      // 位置补偿 2
                id: locationCompensate_02_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1304",locationCompensate_02_Input.text)
                    locationCompensate_02_Text.visible = true
                    locationCompensate_02_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_02_Input.forceActiveFocus()
                    locationCompensate_02_Input.text = locationCompensate_02_Text.text
                    locationCompensate_02_Text.visible = false
                    locationCompensate_02_Input.visible = true
                    locationCompensate_02_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 310
            font.pixelSize: 30
            font.bold: true
            text: qsTr("750")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 270
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_03_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate03
            }

            TextInput{      // 位置补偿 3
                id: locationCompensate_03_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1306",locationCompensate_03_Input.text)
                    locationCompensate_03_Text.visible = true
                    locationCompensate_03_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_03_Input.forceActiveFocus()
                    locationCompensate_03_Input.text = locationCompensate_03_Text.text
                    locationCompensate_03_Text.visible = false
                    locationCompensate_03_Input.visible = true
                    locationCompensate_03_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 430
            font.pixelSize: 30
            font.bold: true
            text: qsTr("1000")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 390
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_04_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate04
            }

            TextInput{      // 位置补偿 4
                id: locationCompensate_04_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1308",locationCompensate_04_Input.text)
                    locationCompensate_04_Text.visible = true
                    locationCompensate_04_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_04_Input.forceActiveFocus()
                    locationCompensate_04_Input.text = locationCompensate_04_Text.text
                    locationCompensate_04_Text.visible = false
                    locationCompensate_04_Input.visible = true
                    locationCompensate_04_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 550
            font.pixelSize: 30
            font.bold: true
            text: qsTr("1250")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 510
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_05_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate05
            }

            TextInput{      // 位置补偿 5
                id: locationCompensate_05_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1310",locationCompensate_05_Input.text)
                    locationCompensate_05_Text.visible = true
                    locationCompensate_05_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_05_Input.forceActiveFocus()
                    locationCompensate_05_Input.text = locationCompensate_05_Text.text
                    locationCompensate_05_Text.visible = false
                    locationCompensate_05_Input.visible = true
                    locationCompensate_05_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 670
            font.pixelSize: 30
            font.bold: true
            text: qsTr("1500")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 630
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_06_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate06
            }

            TextInput{      // 位置补偿 6
                id: locationCompensate_06_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1312",locationCompensate_06_Input.text)
                    locationCompensate_06_Text.visible = true
                    locationCompensate_06_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_06_Input.forceActiveFocus()
                    locationCompensate_06_Input.text = locationCompensate_06_Text.text
                    locationCompensate_06_Text.visible = false
                    locationCompensate_06_Input.visible = true
                    locationCompensate_06_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 790
            font.pixelSize: 30
            font.bold: true
            text: qsTr("1750")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 750
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_07_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate07
            }

            TextInput{      // 位置补偿 7
                id: locationCompensate_07_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_07_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1314",locationCompensate_07_Input.text)
                    locationCompensate_07_Text.visible = true
                    locationCompensate_07_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_07_Input.forceActiveFocus()
                    locationCompensate_07_Input.text = locationCompensate_07_Text.text
                    locationCompensate_07_Text.visible = false
                    locationCompensate_07_Input.visible = true
                    locationCompensate_07_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 910
            font.pixelSize: 30
            font.bold: true
            text: qsTr("2000")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 130
            anchors.top: parent.top
            anchors.topMargin: 870
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_08_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate08
            }

            TextInput{      // 位置补偿 8
                id: locationCompensate_08_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_08_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1316",locationCompensate_08_Input.text)
                    locationCompensate_08_Text.visible = true
                    locationCompensate_08_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_08_Input.forceActiveFocus()
                    locationCompensate_08_Input.text = locationCompensate_08_Text.text
                    locationCompensate_08_Text.visible = false
                    locationCompensate_08_Input.visible = true
                    locationCompensate_08_Input.selectAll()
                }
            }
        }
        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 70
            font.pixelSize: 30
            font.bold: true
            text: qsTr("2250")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 30
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_09_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate09
            }

            TextInput{      // 位置补偿 9
                id: locationCompensate_09_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_09_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1318",locationCompensate_09_Input.text)
                    locationCompensate_09_Text.visible = true
                    locationCompensate_09_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_09_Input.forceActiveFocus()
                    locationCompensate_09_Input.text = locationCompensate_09_Text.text
                    locationCompensate_09_Text.visible = false
                    locationCompensate_09_Input.visible = true
                    locationCompensate_09_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 190
            font.pixelSize: 30
            font.bold: true
            text: qsTr("2500")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 150
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_10_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate10
            }

            TextInput{      // 位置补偿 10
                id: locationCompensate_10_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_10_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1320",locationCompensate_10_Input.text)
                    locationCompensate_10_Text.visible = true
                    locationCompensate_10_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_10_Input.forceActiveFocus()
                    locationCompensate_10_Input.text = locationCompensate_10_Text.text
                    locationCompensate_10_Text.visible = false
                    locationCompensate_10_Input.visible = true
                    locationCompensate_10_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 310
            font.pixelSize: 30
            font.bold: true
            text: qsTr("2750")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 270
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_11_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate11
            }

            TextInput{      // 位置补偿 11
                id: locationCompensate_11_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_11_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1322",locationCompensate_11_Input.text)
                    locationCompensate_11_Text.visible = true
                    locationCompensate_11_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_11_Input.forceActiveFocus()
                    locationCompensate_11_Input.text = locationCompensate_11_Text.text
                    locationCompensate_11_Text.visible = false
                    locationCompensate_11_Input.visible = true
                    locationCompensate_11_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 430
            font.pixelSize: 30
            font.bold: true
            text: qsTr("3000")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 390
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_12_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate12
            }

            TextInput{      // 位置补偿 12
                id: locationCompensate_12_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_12_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1324",locationCompensate_12_Input.text)
                    locationCompensate_12_Text.visible = true
                    locationCompensate_12_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_12_Input.forceActiveFocus()
                    locationCompensate_12_Input.text = locationCompensate_12_Text.text
                    locationCompensate_12_Text.visible = false
                    locationCompensate_12_Input.visible = true
                    locationCompensate_12_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 550
            font.pixelSize: 30
            font.bold: true
            text: qsTr("3250")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 510
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_13_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate13
            }

            TextInput{      // 位置补偿 13
                id: locationCompensate_13_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_13_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1326",locationCompensate_13_Input.text)
                    locationCompensate_13_Text.visible = true
                    locationCompensate_13_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_13_Input.forceActiveFocus()
                    locationCompensate_13_Input.text = locationCompensate_13_Text.text
                    locationCompensate_13_Text.visible = false
                    locationCompensate_13_Input.visible = true
                    locationCompensate_13_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 670
            font.pixelSize: 30
            font.bold: true
            text: qsTr("3500")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 630
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_14_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate14
            }

            TextInput{      // 位置补偿 14
                id: locationCompensate_14_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_14_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1328",locationCompensate_14_Input.text)
                    locationCompensate_14_Text.visible = true
                    locationCompensate_14_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_14_Input.forceActiveFocus()
                    locationCompensate_14_Input.text = locationCompensate_14_Text.text
                    locationCompensate_14_Text.visible = false
                    locationCompensate_14_Input.visible = true
                    locationCompensate_14_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 790
            font.pixelSize: 30
            font.bold: true
            text: qsTr("3750")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 750
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_15_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate15
            }

            TextInput{      // 位置补偿 15
                id: locationCompensate_15_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_15_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1330",locationCompensate_15_Input.text)
                    locationCompensate_15_Text.visible = true
                    locationCompensate_15_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_15_Input.forceActiveFocus()
                    locationCompensate_15_Input.text = locationCompensate_15_Text.text
                    locationCompensate_15_Text.visible = false
                    locationCompensate_15_Input.visible = true
                    locationCompensate_15_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 380
            anchors.top: parent.top
            anchors.topMargin: 910
            font.pixelSize: 30
            font.bold: true
            text: qsTr("4000")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 480
            anchors.top: parent.top
            anchors.topMargin: 870
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_16_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate16
            }

            TextInput{      // 位置补偿 16
                id: locationCompensate_16_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_16_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1332",locationCompensate_16_Input.text)
                    locationCompensate_16_Text.visible = true
                    locationCompensate_16_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_16_Input.forceActiveFocus()
                    locationCompensate_16_Input.text = locationCompensate_16_Text.text
                    locationCompensate_16_Text.visible = false
                    locationCompensate_16_Input.visible = true
                    locationCompensate_16_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 720
            anchors.top: parent.top
            anchors.topMargin: 70
            font.pixelSize: 30
            font.bold: true
            text: qsTr("4250")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 820
            anchors.top: parent.top
            anchors.topMargin: 30
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_17_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate17
            }

            TextInput{      // 位置补偿 17
                id: locationCompensate_17_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_17_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1334",locationCompensate_17_Input.text)
                    locationCompensate_17_Text.visible = true
                    locationCompensate_17_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_17_Input.forceActiveFocus()
                    locationCompensate_17_Input.text = locationCompensate_17_Text.text
                    locationCompensate_17_Text.visible = false
                    locationCompensate_17_Input.visible = true
                    locationCompensate_17_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 720
            anchors.top: parent.top
            anchors.topMargin: 190
            font.pixelSize: 30
            font.bold: true
            text: qsTr("4500")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 820
            anchors.top: parent.top
            anchors.topMargin: 150
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_18_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate18
            }

            TextInput{      // 位置补偿 18
                id: locationCompensate_18_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_18_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1336",locationCompensate_18_Input.text)
                    locationCompensate_18_Text.visible = true
                    locationCompensate_18_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_18_Input.forceActiveFocus()
                    locationCompensate_18_Input.text = locationCompensate_18_Text.text
                    locationCompensate_18_Text.visible = false
                    locationCompensate_18_Input.visible = true
                    locationCompensate_18_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 720
            anchors.top: parent.top
            anchors.topMargin: 310
            font.pixelSize: 30
            font.bold: true
            text: qsTr("4750")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 820
            anchors.top: parent.top
            anchors.topMargin: 270
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_19_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate19
            }

            TextInput{      // 位置补偿 19
                id: locationCompensate_19_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false
                // text: locationCompensate_19_Text.text

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1338",locationCompensate_19_Input.text)
                    locationCompensate_19_Text.visible = true
                    locationCompensate_19_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_19_Input.forceActiveFocus()
                    locationCompensate_19_Input.text = locationCompensate_19_Text.text
                    locationCompensate_19_Text.visible = false
                    locationCompensate_19_Input.visible = true
                    locationCompensate_19_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 720
            anchors.top: parent.top
            anchors.topMargin: 430
            font.pixelSize: 30
            font.bold: true
            text: qsTr("5000")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 820
            anchors.top: parent.top
            anchors.topMargin: 390
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id:locationCompensate_20_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate20
            }

            TextInput{      // 位置补偿 20
                id: locationCompensate_20_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1340",locationCompensate_20_Input.text)
                    locationCompensate_20_Text.visible = true
                    locationCompensate_20_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_20_Input.forceActiveFocus()
                    locationCompensate_20_Input.text = locationCompensate_20_Text.text
                    locationCompensate_20_Text.visible = false
                    locationCompensate_20_Input.visible = true
                    locationCompensate_20_Input.selectAll()
                }
            }
        }

        Text{
            anchors.right: parent.right
            anchors.rightMargin: 260
            anchors.top: parent.top
            anchors.topMargin: 700
            font.pixelSize: 30
            font.bold: true
            text: qsTr("料长设定")
        }

        Rectangle{          // 料长
            anchors.right: parent.right
            anchors.rightMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 660
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id: lc_Setting_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.LC_value
            }

            TextInput{      // 料长设定输入框
                id: lc_Setting_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("212",lc_Setting_Input.text)
                    lc_Setting_Text.visible = true
                    lc_Setting_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    lc_Setting_Input.forceActiveFocus()
                    lc_Setting_Input.text = lc_Setting_Text.text
                    lc_Setting_Input.selectAll()
                    lc_Setting_Text.visible = false
                    lc_Setting_Input.visible = true
                }
            }
        }

        Rectangle{          // 任意位置补偿页面切换按钮
            anchors.right: parent.right
            anchors.rightMargin: 30
            anchors.top: parent.top
            anchors.topMargin: 870
            width: 300
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"
            color: "#FF7F50"

            Text{
                anchors.centerIn: parent
                font.pixelSize: 40
                font.bold: true
                text:qsTr("任意位置补偿")
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.forceActiveFocus()
                    parent.color = "#FFFF00"
                }

                onReleased: {
                    parent.color = "#FF7F50"
                    anyLocationCompensate.visible = true
                    locationCompensateSetting.visible = true
                }
            }
        }



    }


    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 995
        anchors.horizontalCenter: backGround.horizontalCenter
        color: "#00BFFF"
        border.width: 5
        border.color: "#F0F8FF"
        width: backGround.width
        height: 300

        Text{
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: parent.top
            anchors.topMargin: 10
            font.pixelSize: 40
            font.bold: true
            color: "red"
            text: qsTr("摆角专补")
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 120
            anchors.top: parent.top
            anchors.topMargin: 100
            font.pixelSize: 30
            font.bold: true
            text: qsTr("位置下限")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 270
            anchors.top: parent.top
            anchors.topMargin: 60
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id: locationDown_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_DownLimit_BJ
            }

            TextInput{      // 位置下限输入框 - 摆角专补
                id: locationDown_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1374",locationDown_Input.text)
                    locationDown_Text.visible = true
                    locationDown_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationDown_Input.forceActiveFocus()
                    locationDown_Input.text = locationDown_Text.text
                    locationDown_Text.visible = false
                    locationDown_Input.visible = true
                    locationDown_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 560
            anchors.top: parent.top
            anchors.topMargin: 100
            font.pixelSize: 30
            font.bold: true
            text: qsTr("位置上限")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 710
            anchors.top: parent.top
            anchors.topMargin: 60
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id: locationUp_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_UpLimit_BJ
            }

            TextInput{      // 位置上限输入框 - 摆角专补
                id: locationUp_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1376",locationUp_Input.text)
                    locationUp_Text.visible = true
                    locationUp_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationUp_Input.forceActiveFocus()
                    locationUp_Input.text = locationUp_Text.text
                    locationUp_Text.visible = false
                    locationUp_Input.visible = true
                    locationUp_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 120
            anchors.top: parent.top
            anchors.topMargin: 220
            font.pixelSize: 30
            font.bold: true
            text: qsTr("位置补偿")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 270
            anchors.top: parent.top
            anchors.topMargin: 180
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id: locationCompensate_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.Location_Compensate_BJ
            }

            TextInput{      // 位置补偿输入框 - 摆角专补
                id: locationCompensate_Input
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                font.italic: true
                maximumLength: 10
                visible: false

                onEditingFinished: {
                    Cpp_Connect.write_modbus_rtu_Hold_F("1378",locationCompensate_Input.text)
                    locationCompensate_Text.visible = true
                    locationCompensate_Input.visible = false
                }
            }

            MouseArea{
                anchors.fill: parent

                onClicked: {
                    locationCompensate_Input.forceActiveFocus()
                    locationCompensate_Input.text = locationCompensate_Text.text
                    locationCompensate_Text.visible = false
                    locationCompensate_Input.visible = true
                    locationCompensate_Input.selectAll()
                }
            }
        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 560
            anchors.top: parent.top
            anchors.topMargin: 220
            font.pixelSize: 30
            font.bold: true
            text: qsTr("启用开关")
        }


        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 710
            anchors.top: parent.top
            anchors.topMargin: 180
            width: 200
            height: 100
            radius: 10
            border.width: 1
            border.color: "#f0f8ff"

            color: Cpp_Connect.BJZB_Btn ? "#ff3606" : "#006cee"


            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                text: Cpp_Connect.BJZB_Btn ? qsTr("已启用") : qsTr("已关闭")
            }
            MouseArea{
                anchors.fill: parent

                onClicked: {
                    parent.forceActiveFocus()

                    if(!Cpp_Connect.BJZB_Btn)
                    {
                        Cpp_Connect.write_modbus_rtu_Coils("421","1")
                    }
                    else
                    {
                        Cpp_Connect.write_modbus_rtu_Coils("421","0")
                    }
                }
            }
        }

    }


    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 1290
        anchors.horizontalCenter: backGround.horizontalCenter
        color: "#00BFFF"
        border.width: 5
        border.color: "#F0F8FF"
        width: backGround.width
        height: 150

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 20
            anchors.verticalCenter: parent.verticalCenter
            font.pixelSize: 30
            font.bold: true
            text: qsTr("当前位置")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 160
            anchors.verticalCenter: parent.verticalCenter
            width: 200
            height: 100
            radius: 10
            color: "black"
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id: currentLocation_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                color: "aqua"
                text: Cpp_Connect.currentLocation
            }

        }

        Text{
            anchors.left: parent.left
            anchors.leftMargin: 390
            anchors.verticalCenter: parent.verticalCenter
            font.pixelSize: 30
            font.bold: true
            text: qsTr("X轴当前位置")
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 570
            anchors.verticalCenter: parent.verticalCenter
            width: 200
            height: 100
            radius: 10
            color: "black"
            border.width: 1
            border.color: "#F0F8FF"

            Text{
                id: currentLocationXAxis_Text
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                visible: true
                color: "aqua"
                text: Cpp_Connect.xAxisCurrentLocation
            }

        }

    }


    Rectangle{
        anchors.top: backGround.top
        anchors.topMargin: 1435
        anchors.horizontalCenter: backGround.horizontalCenter
        color: "#00BFFF"
        border.width: 5
        border.color: "#F0F8FF"
        width: backGround.width
        height: 150

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 30
            anchors.verticalCenter: parent.verticalCenter
            radius: 10
            color: "#006cee"
            border.width: 1
            border.color: "#f0f8ff"
            width: 200
            height: 100

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                text: qsTr("返  回")
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#ff3606"
                }

                onReleased: {
                    parent.color = "#006cee"
                    locationCompensateSetting.visible = false
                    advanceSettingWindow.visible = true
                }
            }
        }


        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 500
            anchors.verticalCenter: parent.verticalCenter
            radius: 10
            color: "#006cee"
            border.width: 1
            border.color: "#f0f8ff"
            width: 200
            height: 100

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                text: qsTr("复  位")
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#ff3606"
                    parent.forceActiveFocus()
                    Cpp_Connect.write_modbus_rtu_Coils("5","1")
                }

                onReleased: {
                    parent.color = "#006cee"
                    Cpp_Connect.write_modbus_rtu_Coils("5","0")
                }
            }
        }

        Rectangle{
            anchors.left: parent.left
            anchors.leftMargin: 750
            anchors.verticalCenter: parent.verticalCenter
            radius: 10
            color: "#006cee"
            border.width: 1
            border.color: "#f0f8ff"
            width: 200
            height: 100

            Text{
                anchors.centerIn: parent
                font.pixelSize: 30
                font.bold: true
                text: qsTr("开始定位")
            }

            MouseArea{
                anchors.fill: parent

                onPressed: {
                    parent.color = "#ff3606"
                    parent.forceActiveFocus()
                    Cpp_Connect.write_modbus_rtu_Coils("24","1")
                }

                onReleased: {
                    parent.color = "#006cee"
                    Cpp_Connect.write_modbus_rtu_Coils("24","0")
                }
            }
        }


    }




}

